package com.concurrent.base;



public class MyRunnable implements Runnable{
    /**
     * 通过实现runnable接口，构造一个任务。该任务可以传入Thead中，生成一个线程
     */
    @Override
    public void run() {

        System.out.println("this is a runnable class"+Thread.currentThread().getName());
    }

    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();
        Thread thread = new Thread(myRunnable);
        thread.start();
        System.out.println("this is mainThead");
    }
}
